from typing import Optional, Any

from pydantic import BaseModel


class BaseResponseSchema(BaseModel):
    code: int
    message: str
    data: Optional[Any] = None


class SuccessResponseSchema(BaseResponseSchema):
    code: int = 200
    message: str = "success"


class ErrorResponse(BaseResponseSchema):
    code: int = 400
    message: str = "error"
